package com.cscj.android.repository.db.entity

import androidx.room.Entity
import androidx.room.PrimaryKey
import java.util.Date


@Entity(tableName = "browse_history")
data class BrowseHistoryEntity(
    @PrimaryKey(autoGenerate = true) val id: Int = 0, val title: String, val icon: String? = null, //base64
    val url: String, val visitTime: Date = Date()
){
    companion object{
        const val RootId = -1
    }

    fun isRootItem() = id == RootId
}
